package com.zej.dao;

import com.zej.bean.Department;

import org.springframework.stereotype.Repository;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

/**
 * @author 一缕茜阳
 * @date 2021/11/6
 */
@Repository
public class DepartmentDao {

    private static Map<Integer, Department> depts = null;
    static {
        depts = new HashMap<Integer,Department>();
        depts.put(101,new Department(101,"教学部"));
        depts.put(102,new Department(102,"市场部"));
        depts.put(103,new Department(103,"后勤部"));
        depts.put(104,new Department(104,"教研部"));
        depts.put(105,new Department(105,"运营部"));
    }

    public Collection<Department> getDept(){
        return depts.values();
    }
    public Department getDept(Integer id){
        return depts.get(id);
    }
}
